file(GLOB_RECURSE SOURCES *.cpp)
file(GLOB HEADERS *.h *.hpp *.tpp)

foreach(def ${wxWidgets_DEFINITIONS})
 add_definitions(
	 -D${def}
 )
endforeach()
add_definitions(
 -DSCI_LEXER -DLINK_LEXERS
)

add_executable(reporter4
  ${SOURCES} ${HEADERS}
)

target_include_directories(reporter4
  PRIVATE
    $<INSTALL_INTERFACE:include>
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
    ${CMAKE_SOURCE_DIR}/iks/client/include
)

target_link_libraries(reporter4
  PRIVATE
    Szarp2
    wxcommon
    wxscintilla
    iks-client
    ${OPENSSL_LIBRARIES}
    ${OPENGL_LIBRARIES}
    ${XMLRPCEPI_LIBRARIES}
    ${CARES_LIBRARIES}
    ${SQLITE3_LIBRARIES}
    ${FTGL_LIBRARIES}
)

add_custom_target( reporter4_pl ALL msgfmt --output-file=pl/reporter4.mo pl/reporter4.po )
install(FILES pl/reporter4.mo DESTINATION "${SZARP_SHAREDIR}/locales/pl_PL/LC_MESSAGES/" )

install(TARGETS reporter4
  RUNTIME DESTINATION "${INSTALL_BINDIR}" DESTINATION bin)
